Skip to content

Add regression test for list reorder + reattach with cache.collections=false#92

Open
jasper-vandemalle wants to merge 1 commit intodatanucleus:masterfrom
jasper-vandemalle:regression-test-list-reorder-cache
Open

Add regression test for list reorder + reattach with cache.collections=false#92
jasper-vandemalle wants to merge 1 commit intodatanucleus:masterfrom
jasper-vandemalle:regression-test-list-reorder-cache

Conversation

@jasper-vandemalle
Copy link
Copy Markdown

Regression test for datanucleus-core#526.

When datanucleus.cache.collections is false and you reorder a detached entity's List before reattaching, SCOUtils.updateListWithListElements() blows up with an IndexOutOfBoundsException. Two test cases here: one that inserts at the start of the list, one that fully reverses it. Both reproduce the bug reliably.

Both fail without the fix, both pass with it. Tested against H2 using the local SNAPSHOT of datanucleus-core.

Companion fix: datanucleus/datanucleus-core#534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant